<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016-02-17
 * Time: 14:51
 */
namespace common\models\Service;

use common\models\Cache;
use common\models\DAO\Address;
use common\models\CommonFunction;

class AddressService{

    public function Address(){
        $return = ['status'=>0];
        $postal = new Address();
        $postal->username = $_POST['username'];
        $postal->phone = CommonFunction::encrypt($_POST['phone']);
        $postal->address = $_POST['address'];
        $postal->save() && $return = ['status'=>1];
        return json_encode($return);
    }
}
